<!DOCTYPE html>
<style>
#div { display:block; float: left; width: 100px; height: 50px; background-color: green; }
#float { width: 50px; height: 50px; background-color: green; float: left; }
</style>
<p>crbug.com/585064: Floats should fold back into anonymous blocks if possible. There should be a single green rectangle below.</p>
<div style="position: absolute; top: 50px; width: 500px;">
    <div style="height: 50px; width: 50px;"></div>
    <span>X</span>
    <div id="div"></div>
    <div id="float" data-offset-y=50></div>
</div>
<script src="../../../resources/check-layout.js"></script>
<script>
document.body.offsetTop;
document.getElementById("div").style.float = 'none';
document.body.offsetTop;
document.getElementById("div").style.float = 'left';
checkLayout("#float");
</script>
